a = input()
lst0 = a.split(',')
lst = [int(x) for x in lst0]
lst1 = lst.copy()
lst1.sort()
if lst1 == lst:
    print('The list is already sorted')
else:
    print('The list is not sorted')
